\documentclass{article}
\usepackage{pgfplots}
\usepgfplotslibrary{fillbetween}
\pgfplotsset{compat=1.14}
\begin{document}
\begin{tikzpicture}
    \begin{axis}[
        xmin=0,xmax=4,
        ymin=0,ymax=1,
        axis on top,
    ]
        \addplot+ [
            thick,
            no markers,
            name path=A,
            domain=0:4,
            samples=5,
%            smooth,
        ] {1/(x+1)};

        \path [name path=B] (axis cs:0,0) -- (axis cs:4,0);

        \addplot+ fill between [
            of=A and B,
            soft clip={domain=1:3},
        ];
    \end{axis}
\end{tikzpicture}
\end{document}
